package com.lyr.thread1;

public class MyThread1 extends Thread{
    public MyThread1() {
    }

    public MyThread1(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i=0;i<5;i++){
            System.out.println("当前线程是"+this.getName());

            try {
                // 线程休眠时间
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
